<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/angular.min.js"></script>
    <script>
        var app =  angular.module("mymodule",[]);
        app.controller("mycontroller",function ($scope) {
            $scope.add=function () {
                $scope.z=parseInt($scope.x)+parseInt($scope.y);
            }
        });
    </script>
</head>
<body>
    <div ng-app="mymodule" ng-controller="mycontroller">
        请输入x:<input ng-model="x" /><br>
        请输入y:<input ng-model="y" /><br>
        结果:{{z}}<br>
        <button ng-click="add()">点击计算结果</button>
    </div>
</body>
</html>